/**
 * Bestpay.com.cn Inc.
 * Copyright (c) 2011-2020 All Rights Reserved.
 */
package com.suxiaoxiao.springbootlearn.designpattern.chianofresponsibilitypattern;

/**
 * desc
 *
 * @author zhaorongzhang
 * @version AbstractLeaveHandler.java, v 0.1 2020/1/18 3:34 下午 zhaorongzhang Exp $$
 */
public abstract class AbstractLeaveHandler {

    /**
     * 直接主管审批处理的请假天数
     */
    protected int MIN = 1;

    /**
     * 部门经理处理的请假天数
     */
    protected int MIDDLE = 3;

    /**
     * 总经理处理的请假天数
     */
    protected int MAX = 30;

    /**
     * 领导名称
     */
    protected String handlerName;

    /**
     * 下一个处理器
     */
    protected AbstractLeaveHandler nextHandler;

    /**
     * 设置责任链顺序
     * @param nextHandler
     */
    public void setNextHandler(AbstractLeaveHandler nextHandler) {
        this.nextHandler = nextHandler;
    }

    /**
     * 具体责任实现
     * @param leaveRequest
     */
    public abstract void handlerRequest(LeaveRequest leaveRequest);

}